package com.example.springboot.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.springboot.dao.UserDao;
import com.example.springboot.dao.UserMybatisPlusDao;
import com.example.springboot.entity.User;
import com.example.springboot.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class UserServiceImpl implements UserService {
    @Resource
    private UserDao userDao;
    @Resource
    private UserMybatisPlusDao userMybatisPlusDao;

    @Override
    public User selectUserByIdMybatis(Integer id) {
        return userDao.getUserById(id);
    }

    @Override
    public User selectUserByIdMybatisPlus(Integer id) {
        return userMybatisPlusDao.selectById(id);
    }
}
